export default {
	// 获取页面数据
	getTableData() {
		var params = {
			// id:this.id
			language: this.$store.getters.getLanguage
		}

		this.axiosGets("News/imgShow", params, function(res) {
			if (res.data.code === 0) {
				this.msgSuccess(res.data.message)
				this.form = res.data.data[0]
				this.upImg.imageUrl = this.imgURL + this.form.file.url+'/'+this.form.file.name;
			} else {
				this.msgError(res.data.message)
			}

		})
	},

	//编辑
	edit() {
		// let params = this.form;
		let params = new FormData();

		params.append('id', this.form.id);
		params.append('language', this.$store.getters.getLanguage);


		if (this.upImg.file) {
			params.append('file', this.upImg.file);
		}


		this.axiosPostFile('News/imgEdit', params, res => {
			if (res.data.code === 0) {
				this.msgSuccess(res.data.msg)
			}
		})
	},


}
